package com.leyou.item.web;

import com.leyou.common.enums.ExceptionEnum;
import com.leyou.common.exceptiion.LyException;
import com.netflix.ribbon.proxy.annotation.Http;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wgc
 * @create 2019-04-05 18:27
 */
@RestController
@RequestMapping("item")
public class ItemController {
    @PostMapping("test")
    public ResponseEntity<Void> saveGoods(String price){
        if(StringUtils.isEmpty(price)){
            throw  new LyException(ExceptionEnum.CATEGORY_NOT_FOUND);
        }
        return null;

    }
}
